<template>
<!-- 暂不开发，已屏蔽 -->
  <div class="tablePageWarp">
    <div>
      <a-form layout="vertical" >
        <a-row :gutter="[16,0]" style="margin-bottom: 16px;">
          <!--报文类型  -->
          <a-col :md="4" :sm="24">
            <a-form-model-item :label="$t('报文类型')">
              <a-select
                v-model="queryParam.xx"
                optionFilterProp="children"
                :filterOption="$commonFun.filterOption"
                @change="refreshData(true)"
                showSearch
                :placeholder="$t('报文类型')"
                allow-clear
                style="width:100%"
              >
                <a-select-option
                  v-for="item in 5"
                  :key="item"
                  :value="item"
                  :title="item"
                >{{ item }}</a-select-option>
              </a-select>
            </a-form-model-item>
          </a-col>
          <!-- 创建时间-->
          <a-col :md="6" :sm="24">
            <a-form-model-item :label="$t('创建时间')">
              <a-range-picker
                @change="selectDateRange"
                v-model="createTime"
                :show-time="{
                  hideDisabledOptions: true,
                  defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('23:59:59', 'HH:mm:ss')],
                }"
                style="width: 100%"
                :placeholder="['上报时间-开始','上报时间-结束']"
              />
            </a-form-model-item>
          </a-col>
          <a-col :md="6" :sm="24" style="margin-top: 22px;">
            <div class="searchBtns">
              <a-button-group>
                <auth-button type="primary" @click="refreshData(true)">
                  <i class="iconfont icon-chazhao"></i>
                  {{ $t('inquiry') }}
                </auth-button>
                <a-button @click="initiSelectValue">
                  <i class="iconfont icon-qingkong"></i>
                  {{ $t('clear') }}
                </a-button>
              </a-button-group>
            </div>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <div class="commonTableSty">
      <s-table
        class="h100"
        ref="table"
        :columns="columns"
        :data="loadData"
        :pagination="false"
        :scrollX="900"
        :rowKey="(record, index) => index"
        size="default" >
      </s-table>
    </div>
  </div>
</template>
<script>
import { STable } from '@/components'
import AuthText from '@/components/AuthText'
import moment from 'moment'
import AuthButton from '@/components/AuthButton'

export default {
  components: {
    STable,
    AuthText,
    AuthButton,
    moment
  },
  computed: {},
  created () {
  },
  data () {
    const datagramLogsListColumns = [
      {
        title: this.$t('报文类型'),
        dataIndex: 'xxx',
        scopedSlots: { customRender: 'xxx' },
        width: 140
      },
      {
        title: this.$t('上报/生成时间'),
        dataIndex: 'xxx',
        scopedSlots: { customRender: 'xxx' },
        width: 140
      },
      {
        title: this.$t('operation'),
        dataIndex: 'operation',
        fixed: 'right',
        scopedSlots: { customRender: 'operation' },
        width: 100
      }
    ]
    return {
      moment,
      columns: datagramLogsListColumns,
      queryParam: {},
      createTime: null

    }
  },
  methods: {
    // 上报时间选择
    selectDateRange (date, dateString) {
      this.queryParam.createTimeStart = dateString[0]
      this.queryParam.createTimeEnd = dateString[1]
      this.refreshData(true);
    },
  }
}
</script>
<style scoped lang="less">
 ::v-deep .ant-form-item-label {
  padding-bottom: 2px;
}
::v-deep .ant-form-item {
  margin-bottom: 0;
}
</style>
